<%@ page language="java" contentType="text/html; charset=US-ASCII"
    pageEncoding="US-ASCII"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%-- Using Struts2 Tags in JSP --%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
    <link rel="stylesheet" href="style.css" />
    <title>NetConsole</title>
</head>
<body>
<table id="page-table"><tr><td>
    <h1>Welcome to NetConsole,</h1>
    <h2>the really amazing administration tool used by skilled administrators !</h2>
    <s:if test="%{#session['error']=='errorSignup'}" >
        <div class="error">Error</br> Email is already taken !</div>
    </s:if> 
    <s:if test="%{#session['error']=='errorLogin'}" >
        <div class="error">Error</br> User name or password is invalid !</div>
    </s:if>
    <table id="accueil" align='center'>
        <tr class="tr-bot">
            <th><h3>Please login below :</h3></th>
            <th><h3>You're not registered yet ? Hurry up !</h3></th>
        </tr>
        <tr class="tr-top"> 
            <td align='center'><p>
                <s:form action="login" cssClass="texte">
                    <s:textfield name="id" label="Login"></s:textfield>
                    <s:textfield name="pwd" label="Password" type="password"></s:textfield>
                    <s:submit value="Login" align="center"></s:submit>
                </s:form>
            </p></td>
            <td align='center'>
                <s:form action="signup" cssClass="texte">
                    <s:textfield name="id" label="Login"></s:textfield>
                    <s:password name="pwd" label="Password"></s:password>
                    <s:textfield name="name" label="Name"></s:textfield>
                    <s:textfield name="email" label="Email"></s:textfield>
                    <s:submit value="Sign Up" align="center"></s:submit>
                </s:form>
            </td>
        </tr>
        <tr class="tr-bot"><th colspan="2" text-align="center">
                <p>Copyright Aurelien Goffi & Romain Nuel - Master RIE 8 - Grenoble INP</p>
        </th></tr>
    </table>
</td></tr>
</table>
</body>
</html>
